﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>
    <div style="display:none">

    </div>
    <script>
        console.log("OK");
        $tmp.$s.$root.$location = $tmp;
        $tmp.oldPath =undefined;
        $tmp.$s.$watch(function () {
           
                return window.location.href;
           
         
        }, function (v) {
            if ($tmp.oldPath != v) {
                //alert(v);
                $tmp.oldPath = v;
            }
            
        });
        $tmp.$s.$watch(function () {
            return ngW8.$("$location").path();


        }, function (v) {
            var f = v.split('/')[1];
            if ($tmp.oldPath != f) {
                //alert(f);
                //$tmp.oldPath = f;
               ;
            }

        });
        //if ($tmp.oldPath != v) {
        //    if (window.location.href.indexOf("#/") > -1) {
        //        var v = window.location.href.split('#/')[1];
        //        alert(v);
        //        $tmp.oldPath = v;
        //    }
        //    else {
        //        var v = "";
        //        alert(v);
        //        $tmp.oldPath = v;
        //    }
        //}
        $tmp.$href = function (v) {
            window.location.href += v;
            //$tmp.$s.$root.$apply();
        }
       
       
    </script>
</body>
</html>
